package com.hl.mapper;

import com.hl.pojo.Publicwelfarecenter;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface PublicCenterMapper {
    @Select("select * from publicwelfarecenter")
    public List<Publicwelfarecenter> getPublicCenterMessage();

    @Delete("delete from publicwelfarecenter where id = #{id}")
    Integer shanChuPublicCenterMessage(Integer id);

    @Update("update publicwelfarecenter set welfare_title = #{welfareTitle},welfare_content = #{welfareContent},img_path = #{imgPath} where id = #{id}")
    Integer xiuGaiPublicCenterMessage(Publicwelfarecenter publicwelfarecenter);

    @Insert("insert into publicwelfarecenter (welfare_title,welfare_content,img_path) values(#{welfareTitle},#{welfareContent},#{imgPath})")
    Integer xinZengPublicCenterMessage(Publicwelfarecenter publicwelfarecenter);

    List<Publicwelfarecenter> souSuoPublicCenterMessage(Publicwelfarecenter publicwelfarecenter);
}
